<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//主页、帮助页、关于页
Route::get('/','StaticPageController@home') ->name('home');
Route::get('/help','StaticPageController@help') ->name('help');
Route::get('/about','StaticPageController@about') ->name('about');
Route::get('signup', 'UsersController@create')->name('signup');
Route::resource('users','UsersController');
Route::get('login','SessionController@create') -> name('login'); //显示登陆页面
Route::post('login','SessionController@store') -> name('login'); //创建新会话（登陆）
Route::delete('logout','SessionController@destroy') -> name('logout'); //销毁会话（退出）php
Route::get('users/{user}/edit','UsersController@edit') -> name('users.edit');//更新用户